home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / Kubuntu 8.10 / kubuntu-8.10-desktop-i386.iso / casper / filesystem.squashfs / etc / zsh_command_not_found < prev   
Text File  |  2008-04-03  |  461b  |  19 lines

  1. # (c) Zygmunt Krynicki 2007,
  2. # Licensed under GPL, see COPYING for the whole text
  3. #
  4. # This script will look-up command in the database and suggest
  5. # installation of packages available from the repository
  6.  
  7. function preexec() {
  8.     command="${1%% *}"
  9. }
  10.  
  11. function precmd() {
  12.     (($?)) && [ -n "$command" ] && [ -x /usr/lib/command-not-found ] && {
  13.         whence -- "$command" >& /dev/null ||
  14.             /usr/bin/python /usr/lib/command-not-found -- "$command"
  15.         unset command
  16.     }
  17. }
  18.  
  19.